package com.zkthink.clh.order.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zkthink.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDateTime;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 车龙惠退款申请表
 * </p>
 *
 * @author chenke
 * @since 2022-04-28
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("chl_order_refund")
@ApiModel(value = "ChlOrderRefund", description = "车龙惠退款申请表")
@AllArgsConstructor
public class ChlOrderRefund extends Entity<Long> {

    private static final long serialVersionUID = 1L;

    /**
     * 订单编号
     */
    @ApiModelProperty(value = "订单编号")
    @Length(max = 255, message = "订单编号长度不能超过255")
    @TableField(value = "order_code", condition = LIKE)
    @Excel(name = "订单编号")
    private String orderCode;

    @ApiModelProperty(value = "")
    @TableField("mid")
    @Excel(name = "")
    private Long mid;

    /**
     * 退款原因
     */
    @ApiModelProperty(value = "退款原因")
    @Length(max = 255, message = "退款原因长度不能超过255")
    @TableField(value = "reason", condition = LIKE)
    @Excel(name = "退款原因")
    private String reason;


    @Builder
    public ChlOrderRefund(Long id, Long createUser, LocalDateTime createTime, Long updateUser, LocalDateTime updateTime,
                    String orderCode, Long mid, String reason) {
        this.id = id;
        this.createUser = createUser;
        this.createTime = createTime;
        this.updateUser = updateUser;
        this.updateTime = updateTime;
        this.orderCode = orderCode;
        this.mid = mid;
        this.reason = reason;
    }

}
